#include"Component.h"
#include"Visitor.h"

void ClientCode1(ConcreteComponentA *compA, ConcreteVisitor1* visitor1) {
    compA->Accept(visitor1);
}

void ClientCode2(ConcreteComponentB *compB, ConcreteVisitor2* visitor2){
    compB->Accept(visitor2);
}

int main() {
  std::cout << "ConcreteComponentA Accepts ConcreteVisitor1:\n";
  ConcreteVisitor1 *visitor1 = new ConcreteVisitor1;
  ConcreteComponentA *compA;
  ClientCode1(compA, visitor1);
  std::cout << "\n";
  std::cout << "ConcreteComponentB Accepts ConcreteVisitor2:\n";
  ConcreteVisitor2 *visitor2 = new ConcreteVisitor2;
  ConcreteComponentB *compB;
  ClientCode2(compB, visitor2);

  delete compA;
  delete compB;
  delete visitor1;
  delete visitor2;

  return 0;
}